﻿using System.Windows;
using System.Windows.Controls;

namespace WPFTestSolution.Pages.Controls.ContentControls.ButtonBases {
    /**
     * https://www.bilibili.com/video/BV1bV411A7Eq?p=30
     * 030-Button按钮(: ButtonBase)
     * https://www.wpfsoft.com/2023/08/23/1225.html
     */
    public partial class _30_Button_Page : Page {
        public _30_Button_Page() {
            InitializeComponent();
            this.Title = "030-Button按钮(: ButtonBase)";

            this.Btn_Button.Click += (sender, args) =>
            {
                MessageBox.Show($"IsDefault={this.Btn_Button.IsDefault} \n" +
                                $"IsCancel={this.Btn_Button.IsCancel} \n" +
                                $"IsDefaulted={this.Btn_Button.IsDefaulted} //获取按钮是否为按 ENTER 键时调用的默认按钮",
                    "按钮信息");
            };
        }
    }
}